{% extends 'page-builder-base.twig' %}
{% set bodyClasses = 'page-news news-list article-with-subnav  single' %}


{% block title %}
<title>{{page.metadata.pagetitle}} | {{siteTitle}}</title>
{% endblock %}

{% block content %}  {# {{dump(news)}} #}
    <section>
		<div class="inner">
		    {% block pageheading %}
			    {% if page.metadata.heading %}
			        <h1>{{ page.metadata.heading }}</h1>
			    {% endif %}
		    {% endblock %}

			<a href="#subnav" class="nav-toggle">Menu</a>

			<ul id="subnav" class="nav subnav scroll-area tabs">
				 
					{%for newsItem in news %} 
						{% if newsItem.videoCode %}
							<li class="has-video">
								<a href={{ path('newsItem', {newsItemTitle: newsItemslug} ) }}>
									<span class="video">Video post</span>{{newsItem.title}}
								</a>
							</li>
						{% else %}
							<li><a href={{newsItem.link}}>{{newsItem.title}}</a></li>
						{% endif %}
					{% endfor %}
			</ul>
			
			<div class="content">
			        <div class="content-block paginated">
					{%for newsItem in news %} 
			            {% if newsItem.title %}
			                <h2 class="title">{{newsItem.title}}</h2>
			                <h3 class="date">{{newsItem.date}}</h3>
			            {% endif %}
				    {{newsItem.videoCode}}
			            {{newsItem.content|raw}}
					{% endfor %}
			        </div>
			        
			{#
			    {%for contentBlock in page.contentBlocks %}
			        {% block contentBlock %}
	
			        <div id="id-{{contentBlock.id}}" class="content-block id-{{contentBlock.id}} paginated">
			            {% if contentBlock.title %}
			                <h2 class="title">{{contentBlock.title}}</h2>
			                <h3 class="date">{{contentBlock.date}}24 January 2014</h3>
			            {% endif %}
				    <span>{{contentBlock.videoCode}}</span>
				    <iframe width="560" height="315" src="//www.youtube.com/embed/sWv5GVV6BTI" frameborder="0" allowfullscreen></iframe>
			            {{contentBlock.content|raw}}
			        </div>
			        
			        {% endblock%}
			    {% endfor%}
			#}
			</div>
	
    	</div><!-- .inner -->
    </section>
{% endblock %}

{% block aside %}
{% endblock %}

		





